//
//  ModuleManager.h
//  HttpDemo
//  Module管理类,以一个单例的形式给到外面
//  Created by 程三 on 17/8/6.
//  Copyright © 2017年 程三. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

//某些模块的功能需要在didFinishLaunchingWithOptions方法里面初始化一些东西的实现该代理
@protocol ModuleProtocol <NSObject>

@optional
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options;
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url;

@end

@interface ModuleManager : NSObject

#pragma mark 获取对象
//+(ModuleManager *)sharedInstance;

#pragma mark 初始化并调用实现didFinishLaunchingWithOptions的类,参数说明：
/*
    moduleNameArray：需要初始化的模型类的名称数组，注意只需要传需要调用didFinishLaunchingWithOptions方法的模型名
    application：UIApplication对象
    launchOptions：NSDictionary对象
 */
-(void)startInitWithModleNameArray:(NSArray *)moduleNameArray application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;

@end
